<template>
  <div class="rightMenu">
    <div class="right_nav">
      <div class="right_nav_item" @click="contactus">
        <i class="iconfont icon-zixun"></i>
      </div>
      <div class="right_nav_item" @click="ewm">
        <i class="iconfont icon-erweima"></i>
      </div>
      <!-- <div class="right_nav_item" @click="contactus">
        <i class="iconfont icon-lianxiwomen"></i>
      </div>-->
      <div id="goTop" class="right_nav_item" @click="top">
        <i class="iconfont icon-fanhuidingbu"></i>
      </div>
    </div>
    <div class="rightMenu_dialog">
      <el-dialog
        :visible.sync="dialog"
        class="dialog"
        width="35%"
        @close="handeclose"
      >
        <div class="contactus_box" v-if="status == 2">
          <div>
            <div
              class="
                s_flex s_align_items s_flex_comlou s_justify_content_center
              "
            >
              <div class="ewm">
                <!-- <h3 class="sq_tilte3 title_color ft_weight_800">联系我们</h3> -->
                <img src="../../../public/ewm.png" alt />
              </div>
              <div class="right">
                <div class="logo_ico s_flex s_align_items">
                  <img src="../../../public/logo2.jpg" />
                  <p>佛山市顺德区顺企知识产权保护服务中心</p>
                </div>
                <div>
                  <span>地址:</span>
                  <span>广东省佛山市顺德区大良街道南方智谷知识产权大夏8楼</span>
                </div>
                <div>
                  <span>电话:</span>
                  <span>0757-22388580</span>
                </div>
                <!-- <div>
                  <span>邮箱:</span>
                  <span>E-Mail:sdipsc@163.com</span>
                </div>-->
                <div>
                  <span>网址:</span>
                  <span>www.shundeip.com</span>
                </div>
              </div>
            </div>
          </div>
        </div>
      </el-dialog>
    </div>

    <!-- <div class="mb_nav">
      <div class="mb_nav_box s_flex s_align_items">
        <div class="mb_nav_item" @click="contactus">联系我们</div>
      </div>
    </div>-->
    <signUp
      :dialogVisible="dialogVisible"
      @handleClose="handleClose"
      @submit="submit"
      :text="text"
      :from="from"
    />
  </div>
</template>

<script>
import signUp from "@/components/web/signUp";
import { teamlist, consultAdd } from "@/api/web";
export default {
  components: {
    signUp,
  },
  props: ["type"],
  data() {
    return {
      cutList: {},
      dialog: false,
      status: 0,
      dialogVisible: false,
      text: {
        title:
          "顺企知识产权保护服务中心专注于为顺德地区中小企业提供专利情报分析、知识产权人才培养、知识产权金融及专利保险推广、产学研对接等专业化服务。",
        btn: "提交",
        next: "下一步",
        cut: "请选择需要咨询的业务类型(可多选):",
      },
      from: false,
    };
  },
  methods: {
    contactus() {
      this.dialogVisible = true;
      this.from = true;
      // this.status = 1;
    },
    ewm() {
      this.dialog = true;
      this.status = 2;
    },
    handeclose() {},
    top() {
      this.$emit("moveTo", true);
    },
    async handleClose() {
      this.dialogVisible = false;
    },
    async submit(form) {
      try {
        await consultAdd({
          ...form,
        });
        this.$message.success("提交成功");
      } catch (error) {
        this.$message.error(error.message);
      }
      this.dialogVisible = false;
      // window.location.reload();
    },
  },
};
</script>

<style lang="less" scoped>
/* right_nav */
.right_nav {
  position: fixed;
  z-index: 1;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}
.right_nav .iconfont {
  font-size: 35px;
  color: inherit;
  transition: all 0.5s ease-in;
}

.right_nav .right_nav_item {
  margin-bottom: 10px;
  padding: 5px;
  cursor: pointer;
  width: 46px;
  height: 46px;
  text-align: center;
  line-height: 36px;
  background: #fafafa;
  border: 1px solid #dcdcdc;
  box-shadow: 0px 4px 8px 0px rgba(238, 238, 238, 0.35);
  border-radius: 5px;
  color: #8590a6;
  .iconfont:hover {
    color: var(--color);
  }
  &:hover {
    box-shadow: 0 0 16px rgba(24, 76, 171, 0.16);
    color: var(--color);
  }
}
.ewm {
  width: 200px;
  // height: 200px;
  // border-right: 1px solid #dbdbdd;
  img {
    width: 100%;
  }
  h3 {
    text-align: center;
    margin-bottom: 20px;
  }
}
.logo_ico {
  img {
    width: 40px;
    height: 40px;
  }
}
.right {
  margin-left: 10px;
  div {
    margin-bottom: 8px;
  }
}
.mb_nav {
  display: none;
}
.contactus_box {
  margin-bottom: 40px;
}
@media (max-width: 750px) {
  .right_nav {
    display: none;
  }
  .right {
    margin-left: 0;
    div {
      margin-bottom: 8px;
      margin-top: 8px;
    }
  }
  .mb_nav {
    width: 100%;
    position: fixed;
    z-index: 5;
    left: 0;
    bottom: 0;
    background-color: #eee;
    height: 60px;
    display: block;
    .mb_nav_box {
      height: 100%;
      .mb_nav_item {
        width: 100%;
        text-align: center;
      }
    }
  }
}
/* right_nav */
</style>